import Api from "./api";
import qs from 'qs'
import { sliceHomeHotModel, APIURL} from "utils/base";
class Memberapis extends Api {
  constructor() {
    super();
  }
  //添加编辑会员信息
  addEditMember(json) {
    return this.post(`${APIURL()}/front/member/saveOrUpdateYjwMember`, qs.stringify(json)).then((res) => {
      return res;
    });
  }
  //获取行业分类
  getIndustry () {
    return this.post(`${APIURL()}/backend/category/queryAllCategoryByNoPage`).then(({ data }) => {
      return data.list
    });
  }
  //获取会员信息
  getMemberInfo (json) {
    return this.post(`${APIURL()}/front/member/queryMemberInfoByUserId`, qs.stringify(json)).then(({ data }) => {
      return data;
    });
  }
  //获取会员信息
  updateImg (json) {
    return this.post(`http://140.143.164.202:8892/backend/image/imageUpload`, json).then(({ data }) => {
      return data;
    });
  }
  //下载接口
  imageDownload (json) {
    return this.post(`${APIURL()}/backend/image/imageDownload`, qs.stringify(json)).then(({ data }) => {
      return data;
    });
  }
  //查询微课堂简介接口
  queryMiroclassCatalogue (json) {
    return this.post(`${APIURL()}/backend/miroclass/queryMiroclassCatalogue`, qs.stringify(json)).then(({ data }) => {
      return data;
    });
  }
}

export default new Memberapis();
